#include<iostream>
using namespace std;
bool check(int num)
{
	if (num % 2 == 0)
	{
		return true;
	}
	else
	{
		return false;
	}
}
int main()
{
	int num = 0;
	int n;
	cin >> n;
	int sum = 0;
	int flag;
	for (int i = 0;i < n;i++)
	{
		cin >> flag;
		if (flag == 0)
		{
			sum += 100;
		}
		if (flag == 1)
		{
			num += 1;
			if (check(num))
			{
				sum -= 30;
			}
			else
			{
				sum += 50;
			}

		}
		cout << sum << endl;
	}
	return 0;
}